home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d21 / dvglue10.arc / DVINIT.C < prev    next >
C/C++ Source or Header  |  1988-08-13  |  2KB  |  61 lines

  1. /*=======================================================*/
  2. /*  DVINIT.C                                             */
  3. /*     initialize/exit API interface                     */
  4. /*                                                       */
  5. /*  (c) Copyright 1988 Ralf Brown  All Rights Reserved   */
  6. /*  May be freely copied for noncommercial use, so long  */
  7. /*  as this copyright notice remains intact, and any     */
  8. /*  changes are marked in the comment blocks preceding   */
  9. /*  functions.                                           */
  10. /*=======================================================*/
  11.  
  12. #include "tvapi.h"
  13.  
  14. /*=======================================================*/
  15. /* DVinit   initialize DESQview API interface, and       */
  16. /*          return version (0 if DV not loaded)          */
  17. /*   Ralf Brown 4/23/88                                  */
  18. /*=======================================================*/
  19.  
  20. int pascal DVinit(void)
  21. {
  22.    int version ;
  23.  
  24.    TVinit() ;
  25.    if ((version = DVver()) > 0)
  26.       {
  27.       _BX = 0x0200 ;  /* set minimum required API level to 2 */
  28.       _AX = 0x110B ;
  29.       geninterrupt(0x15) ;
  30.       if (_AX == 0x0002)
  31.          {
  32.          _BX = 0x0002 ;
  33.          _AX = 0x110B ;
  34.          geninterrupt(0x15) ;
  35.          }
  36.       }
  37.    else
  38.       return 0 ;
  39.    if (version > 0x200)
  40.       {
  41.       /* v2.01-specific API call */
  42.       _AX = 0x1112 ;
  43.       _BX = 1 ;
  44.       geninterrupt(0x15) ;
  45.       }
  46.    return version ;
  47. }
  48.  
  49. /*=======================================================*/
  50. /* DVexit   exit DESQview API interface                  */
  51. /*   Ralf Brown 4/23/88                                  */
  52. /*=======================================================*/
  53.  
  54. void pascal DVexit(void)
  55. {
  56.    TVexit() ;
  57.    /* currently nothing else to do */
  58. }
  59.  
  60. /* End of DVINIT.C */
  61.